/*
============================================================================
 Name        : BlockRecommend.h
 Author      : 
 Version     :
 Copyright   : Your copyright notice
 Description : CBlockRecommend declaration
============================================================================
*/

#ifndef BLOCKRECOMMEND_H
#define BLOCKRECOMMEND_H

// INCLUDES
#include <e32std.h>
#include <e32base.h>
#include <dial.h>

#include "Block.h"

class CSingleLineTextInput;
// CLASS DECLARATION

const TInt KMenuIdRecommend = 100;	//\x{fffd}\x{01bc}\x{fffd}\x{fffd}\x{00fb}\x{fffd}
const TInt KMenuIdSelContact = 101;	//\x{0461}\x{fffd}\x{fffd}j\x{03f5}\x{fffd}\x{fffd}
const TInt KMenuIdRecommendDeclaration = 102;	//\x{fffd}\x{fffd}\x{05b9}\x{fffd}\x{fffd}\x{fffd}
const TInt KMenuIdQueryAward = 103;	//\x{fffd}\x{fffd}\x{05b2}\x{fffd}\x{046f}


/**
*  CBlockRecommend
* 
*/
class CBlockRecommend : public CBlock
{
public:
	~CBlockRecommend();

	static CBlockRecommend* NewL(CBaseBlock* bsBack);

	static CBlockRecommend* NewLC(CBaseBlock* bsBack);

	CBlockRecommend(CBaseBlock* bsBack);

public:
	//new functions
	void AddContacter(const TDesC& aDes);

public:
	//from CBlock
	void OnDraw(CFbsBitGc& g) const;

	void OnKeyEvent(const TInt& keyCode);
	//void OnKeyDown(TInt keyCode);

	void InitPopMenu(const TInt& nType);

	TBool ReadData(const TDesC8& aData);

	void WriteData(TDes8& aBuf);

	TInt GetDataLength();

	TInt16 GetDataType();

	TBool OnMenuEvent(TInt menuId);
	
	void SizeChanged();

	void OnMouseUp(const TPoint& aPt);
	
	void OnInput(const TDesC8& strInput);
	
	void ChangeFocus(TBool aFocus, const TInt& keyCode);
private:
	void ConstructL();

protected:
	void BeforeDraw(CFbsBitGc& g) const;

private:

	RArray<TPhoneNumber>	m_vContacters;
	CDesCArray*				m_vNotice;
	//TPhoneNumber			m_strInputPhone;
	CSingleLineTextInput* 	m_inputphone;
};
                                  
#endif // BLOCKRECOMMEND_H
